#ifndef ADDFRIENDDIALOG_H
#define ADDFRIENDDIALOG_H

#include <QDialog>
#include <QWidget>
#include <QLineEdit>
#include <QGridLayout>
#include "model/data.h"
using model::UserInfo;

class AddFriendItem: public QWidget
{
    Q_OBJECT
public:
    AddFriendItem(const model::UserInfo& userInfo);
};

class AddFriendDialog : public QDialog
{
    Q_OBJECT
public:
    AddFriendDialog(QWidget* parent);
    void addItem(const model::UserInfo& userInfo);
    void clear();

    void setSearchKey(const QString& key);
    void clickSearchBtnDone();

private:
    QLineEdit* searchEdit;
    QVBoxLayout* vLayout;
};

#endif // ADDFRIENDDIALOG_H
